package com.zyd.mappers;

import com.zyd.io.model.VehicleRecordEntity;
import com.zyd.io.model.VehicleRecordEntityExample;
import com.zyd.io.model.VehicleRecordEntityKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface VehicleRecordEntityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @SelectProvider(type=VehicleRecordEntitySqlProvider.class, method="countByExample")
    long countByExample(VehicleRecordEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @DeleteProvider(type=VehicleRecordEntitySqlProvider.class, method="deleteByExample")
    int deleteByExample(VehicleRecordEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @Delete({
        "delete from zydzn_vehiclerecord",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(VehicleRecordEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @Insert({
        "insert into zydzn_vehiclerecord (id, vehiclid, ",
        "stationid, stationcode, ",
        "regtime, tagcode, ",
        "billdate, state, ",
        "ts, createtime, ",
        "createid, dr, islock, ",
        "locktime, iswarn)",
        "values (#{id,jdbcType=INTEGER}, #{vehiclid,jdbcType=VARCHAR}, ",
        "#{stationid,jdbcType=VARCHAR}, #{stationcode,jdbcType=VARCHAR}, ",
        "#{regtime,jdbcType=TIMESTAMP}, #{tagcode,jdbcType=VARCHAR}, ",
        "#{billdate,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, ",
        "#{ts,jdbcType=VARCHAR}, #{createtime,jdbcType=VARCHAR}, ",
        "#{createid,jdbcType=VARCHAR}, #{dr,jdbcType=INTEGER}, #{islock,jdbcType=INTEGER}, ",
        "#{locktime,jdbcType=VARCHAR}, #{iswarn,jdbcType=INTEGER})"
    })
    int insert(VehicleRecordEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @InsertProvider(type=VehicleRecordEntitySqlProvider.class, method="insertSelective")
    int insertSelective(VehicleRecordEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @SelectProvider(type=VehicleRecordEntitySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="vehiclid", property="vehiclid", jdbcType=JdbcType.VARCHAR),
        @Result(column="stationid", property="stationid", jdbcType=JdbcType.VARCHAR),
        @Result(column="stationcode", property="stationcode", jdbcType=JdbcType.VARCHAR),
        @Result(column="regtime", property="regtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="tagcode", property="tagcode", jdbcType=JdbcType.VARCHAR),
        @Result(column="billdate", property="billdate", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="ts", property="ts", jdbcType=JdbcType.VARCHAR),
        @Result(column="createtime", property="createtime", jdbcType=JdbcType.VARCHAR),
        @Result(column="createid", property="createid", jdbcType=JdbcType.VARCHAR),
        @Result(column="dr", property="dr", jdbcType=JdbcType.INTEGER),
        @Result(column="islock", property="islock", jdbcType=JdbcType.INTEGER),
        @Result(column="locktime", property="locktime", jdbcType=JdbcType.VARCHAR),
        @Result(column="iswarn", property="iswarn", jdbcType=JdbcType.INTEGER)
    })
    List<VehicleRecordEntity> selectByExample(VehicleRecordEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @Select({
        "select",
        "id, vehiclid, stationid, stationcode, regtime, tagcode, billdate, state, ts, ",
        "createtime, createid, dr, islock, locktime, iswarn",
        "from zydzn_vehiclerecord",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="vehiclid", property="vehiclid", jdbcType=JdbcType.VARCHAR),
        @Result(column="stationid", property="stationid", jdbcType=JdbcType.VARCHAR),
        @Result(column="stationcode", property="stationcode", jdbcType=JdbcType.VARCHAR),
        @Result(column="regtime", property="regtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="tagcode", property="tagcode", jdbcType=JdbcType.VARCHAR),
        @Result(column="billdate", property="billdate", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="ts", property="ts", jdbcType=JdbcType.VARCHAR),
        @Result(column="createtime", property="createtime", jdbcType=JdbcType.VARCHAR),
        @Result(column="createid", property="createid", jdbcType=JdbcType.VARCHAR),
        @Result(column="dr", property="dr", jdbcType=JdbcType.INTEGER),
        @Result(column="islock", property="islock", jdbcType=JdbcType.INTEGER),
        @Result(column="locktime", property="locktime", jdbcType=JdbcType.VARCHAR),
        @Result(column="iswarn", property="iswarn", jdbcType=JdbcType.INTEGER)
    })
    VehicleRecordEntity selectByPrimaryKey(VehicleRecordEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @UpdateProvider(type=VehicleRecordEntitySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") VehicleRecordEntity record, @Param("example") VehicleRecordEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @UpdateProvider(type=VehicleRecordEntitySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") VehicleRecordEntity record, @Param("example") VehicleRecordEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @UpdateProvider(type=VehicleRecordEntitySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(VehicleRecordEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_vehiclerecord
     *
     * @mbg.generated Sat Nov 03 15:45:21 CST 2018
     */
    @Update({
        "update zydzn_vehiclerecord",
        "set vehiclid = #{vehiclid,jdbcType=VARCHAR},",
          "stationid = #{stationid,jdbcType=VARCHAR},",
          "stationcode = #{stationcode,jdbcType=VARCHAR},",
          "regtime = #{regtime,jdbcType=TIMESTAMP},",
          "tagcode = #{tagcode,jdbcType=VARCHAR},",
          "billdate = #{billdate,jdbcType=VARCHAR},",
          "state = #{state,jdbcType=INTEGER},",
          "ts = #{ts,jdbcType=VARCHAR},",
          "createtime = #{createtime,jdbcType=VARCHAR},",
          "createid = #{createid,jdbcType=VARCHAR},",
          "dr = #{dr,jdbcType=INTEGER},",
          "islock = #{islock,jdbcType=INTEGER},",
          "locktime = #{locktime,jdbcType=VARCHAR},",
          "iswarn = #{iswarn,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(VehicleRecordEntity record);
}